import request from '@/utils/request'
import store from '@/store'

export function getContent(url) {
  return request({
    url,
    method: 'get',
    no404Msg: true,
  })
    .catch((err) => {
      const res = err.response
      if (res && res.status === 404) {
        store.commit('NOT_FOUND')
      }
    })
}

export function deleteRow(path) {
  return request({
    url: path,
    method: 'delete',
  })
}
